// models/Video.js
const { DataTypes } = require('sequelize');
const sequelize = require('../database');
const Course = require('./Course');

const Video = sequelize.define('Video', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },
  courseId: {
    type: DataTypes.INTEGER,
    allowNull: false,
  },
  title: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  url: {
    type: DataTypes.STRING,
    allowNull: false,
  },
});

// Video.belongsTo(Course, { foreignKey: 'courseId' });

module.exports = Video;
